Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75981 - minor change in emerge.py
Summary: minor change in emerge.py
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-28 21:01 UTC by Alec Warner
Modified: 2005-02-28 09:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Small fix (patch,682 bytes, patch)
2004-12-28 21:02 UTC, Alec Warner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Warner (RETIRED) archtester gentoo-dev Security 2004-12-28 21:01:04 UTC
# process the options and command arguments
for x in cmdline:
	if not x:
		continue
	if len(x)>=2 and x[0:2]=="--":
		if x in options:
			myopts.append(x)
		elif x[2:] in actions:
			if x[2:]=="rsync" or x=="rsync":
				# "emerge --rsync"
				print
				print red("*** '--rsync' has been deprecated.")
				print red("*** Please use '--sync' instead.")
				print
the x=="rsync" above is not needed, since x=="rsync" is not possible when x[2:]=="--".  It can be dropped.  x=="rsync" is handled later in the code and performs correctly.  

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




skyfw@spider bin $ diff -C 4 emerge.new emerge
*** emerge.new  Tue Dec 28 23:15:02 2004
--- emerge      Tue Dec 14 07:56:29 2004
***************
*** 225,233 ****
        if len(x)>=2 and x[0:2]=="--":
                if x in options:
                        myopts.append(x)
                elif x[2:] in actions:
!                       if x[2:]=="rsync":
                                # "emerge --rsync"
                                print
                                print red("*** '--rsync' has been deprecated.")
                                print red("*** Please use '--sync' instead.")
--- 225,233 ----
        if len(x)>=2 and x[0:2]=="--":
                if x in options:
                        myopts.append(x)
                elif x[2:] in actions:
!                       if x[2:]=="rsync" or x=="rsync":
                                # "emerge --rsync"
                                print
                                print red("*** '--rsync' has been deprecated.")
                                print red("*** Please use '--sync' instead.")

The case of "rsync" is handled below.
	elif (not myaction) and (x in actions):
		if x not in ["system", "world"]:
			#print red("*** Deprecated use of action '"+x+"'")
			if x=="rsync":
				# "emerge rsync"
				print
				print red("*** 'rsync' will now install the package rsync.")
				print red("*** To sync the tree, please use '--sync' instead.")
				print
				myfiles.append(x)
				continue
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2004-12-28 21:02:46 UTC
Created attachment 47085 [details, diff]
Small fix
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2005-01-10 18:31:58 UTC
Please use context diffs, they are easier to follow.

diff -u
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2005-02-28 09:02:55 UTC
Very minor importance, no updated diff.