Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 362759

Summary: fdisk doesn't accept any command line arguments (sys-apps/util-linux-2.18-r1)
Product: Gentoo Linux Reporter: Dmitry Samoyloff <dmitry>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: major    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dmitry Samoyloff 2011-04-09 19:13:49 UTC
fdisk from sys-apps/util-linux-2.18-r1 doesn't accept any command line arguments, even -v:

<pre>
# fdisk /dev/sda 

Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks

Options:
 -b <size>             sector size (512, 1024, 2048 or 4096)
 -c[=<mode>]           compatible mode: 'dos' or 'nondos' (default)
 -h                    print this help text
 -u[=<unit>]           display units: 'cylinders' or 'sectors' (default)
 -v                    print program version
 -C <number>           specify the number of cylinders
 -H <number>           specify the number of heads
 -S <number>           specify the number of sectors per track
</pre>

<pre>
# fdisk -v 

Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks

Options:
 -b <size>             sector size (512, 1024, 2048 or 4096)
 -c[=<mode>]           compatible mode: 'dos' or 'nondos' (default)
 -h                    print this help text
 -u[=<unit>]           display units: 'cylinders' or 'sectors' (default)
 -v                    print program version
 -C <number>           specify the number of cylinders
 -H <number>           specify the number of heads
 -S <number>           specify the number of sectors per track
</pre>

Reinstalling ebuild didn't helped. Being downgraded to sys-apps/util-linux-2.17.2 , it works again:

<pre>
# fdisk -v 
fdisk (util-linux-ng 2.17.2)
</pre>


Reproducible: Always

Steps to Reproduce:
1. Install sys-apps/util-linux-2.18-r1 .
2. Run "fdisk -v" and see the usage info instead of version number. The same for any other option.




Portage 2.2.0_alpha29 (default/linux/amd64/10.0/no-multilib, gcc-4.4.5, glibc-2.11.3-r0, 2.6.37-gentoo-r2-libre x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-r2-libre-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4800+-with-gentoo-1.12.14
Timestamp of tree: Sat, 09 Apr 2011 12:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.4
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo x11 sunrise mpd perl-experimental local
Installed sets: 
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles http://mirror.yandex.ru/gentoo-distfiles"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/mpd /var/lib/layman/perl-experimental /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 amr apm bash-completion bbdb berkdb branding bzip2 cdda cddb cdr cjk cli consolekit cracklib crypt css cxx dbus deblob djvu dri dts dv dvd dvdr emacs exif ffmpeg flac fontconfig fortran gallium gdbm gif gimp gnutls gphoto2 gpm gstreamer handbook iconv id3 idn ieee1394 ipv6 jabber java6 jpeg kde lame libdsk lirc lm_sensors lzo matroska migemo mikmod mime mmx mmxext mng modules mozilla mp3 mp4 mpeg mtp mudflap musepack nptl nptlonly offensive ogg openal opengl openmp pam pch pcre perl plasma png pppd python qt3support qt4 quicktime readline rss semantic-desktop session smp speex spell sse sse2 ssl startup-notification svg sysfs syslog tcpd theora threads tiff timidity truetype udev unicode v4l v4l2 vcd vorbis vpx wmf x264 xcb xcomposite xface xft xorg xosd xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Robert Welz 2011-04-10 07:02:40 UTC
Could you please repeat the calling syntax:

something like

# fdisk -v

output bla bla

------

seems to work here:

Makemake ~ # /sbin/fdisk -v
fdisk (util-linux-ng 2.18)

so its either a problem with calling the binary or your setup is screwed up.

kind regards,

Robert
Comment 2 Dmitry Samoyloff 2011-04-10 14:09:09 UTC
Oops, you're right. I dug the line `alias fdisk="fdisk -cu"' inside my .bashrc. The command line parsing seems changed and `fdisk -cu -l /dev/blah' isn't working anymore. `fdisk -c -u -l /dev/blah' works fine though.

Thank you Robert, this is not a bug then.
Comment 3 Robert Welz 2011-04-10 15:11:51 UTC
You're welcome. 

btw. is there a way for me to close such easy bugs? This could make the shortening the buglist quicker ;)


kind regards,

Robert
Comment 4 Dmitry Samoyloff 2011-04-10 15:20:21 UTC
I can close this bug using RESOLVED status only (there are no other options in the drop-down list). However, INVALID is more appropriate according to https://bugs.gentoo.org/page.cgi?id=fields.html#status .
Comment 5 Aaron W. Swenson gentoo-dev 2011-04-10 15:47:29 UTC
'Closed' becomes another option once the bug is resolved.
Comment 6 Robert Welz 2011-04-10 16:42:26 UTC
(In reply to comment #4)
> I can close this bug using RESOLVED status only (there are no other options in
> the drop-down list). However, INVALID is more appropriate according to
> https://bugs.gentoo.org/page.cgi?id=fields.html#status .

So you are a certified gentoo developer?

I decided to come active here for the community becourse I am using gentoo linx for a very long time
and I want to become a developer someday.

I have a openvz and one hardening gentoo solution for my www.fixe-post.de site and it gave me so much fun and joy that I want to contribute to this collaborative effort :)

So if I make something really wrong, please correct me. My email address is visible for everyone on this bugzilla system.

regards,

Robert