Modify

Opened 12 years ago

Closed 12 years ago

#305 closed defect (fixed)

ImageBuilder ipkg script uses obsolete head options

Reported by: davide125 Owned by: florian
Priority: low Milestone: 1.0-rc5
Component: other Version: 1.0
Keywords: imagebuilder, head Cc:

Description

On my system, running the ImageBuilder produces an stream of warnings:

head: `-1' option is obsolete; use `-n 1' since this will be removed in the future

Here is a patch for it:

diff -urN OpenWrt-ImageBuilder-Linux-i686-old/scripts/ipkg OpenWrt-ImageBuilder-Linux-i686/scripts/ipkg
--- OpenWrt-ImageBuilder-Linux-i686-old/scripts/ipkg    2006-02-12 01:20:17.000000000 +0100
+++ OpenWrt-ImageBuilder-Linux-i686/scripts/ipkg        2006-02-12 15:07:38.000000000 +0100
@@ -43,7 +43,7 @@

 ipkg_src_byname() {
        local src="$1"
-       ipkg_srcs $src | head -1
+       ipkg_srcs $src | head -n 1
 }

 ipkg_dests() {
@@ -68,16 +68,16 @@
 }

 ipkg_dest_default() {
-       ipkg_dests_all | head -1
+       ipkg_dests_all | head -n 1
 }

 ipkg_dest_default_name() {
-       ipkg_dest_names | head -1
+       ipkg_dest_names | head -n 1
 }

 ipkg_dest_byname() {
        local dest="$1"
-       ipkg_dests $dest | head -1
+       ipkg_dests $dest | head -n 1
 }

 ipkg_option() {
@@ -984,7 +984,7 @@

 ipkg_upgrade_pkg() {
        local pkg="$1"
-       local avail_ver="`ipkg_info $pkg Version | ipkg_extract_value | head -1`"
+       local avail_ver="`ipkg_info $pkg Version | ipkg_extract_value | head -n 1`"

        is_installed=
        for dest_name in `ipkg_dest_names`; do

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by florian

  • Owner changed from developers to florian

comment:2 Changed 12 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3238

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.