Bug 64222
| Summary: | splitdistro errors out of python: unable to find /SRPMS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Len Hickey <leonard.hickey> | ||||
| Component: | anaconda | Assignee: | Jeremy Katz <katzj> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | Brock Organ <borgan> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.2 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2002-05-03 05:37:33 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
This works as designed. Your directories are not correct if you're not having this work. I build dozens of trees a week using the exact same copy of splitdistro that is in anaconda-runtime and it works just fine. And to illustrate by hand that the calls do work. [root@porkchop katzj]# rm -rf disc4/ [root@porkchop katzj]# mkdir disc4 [root@porkchop katzj]# cp -al SRPMS/. disc4/ [root@porkchop katzj]# ls -d disc4/SRPMS/ disc4/SRPMS/ hello borgan I just redownloaded the source file "anaconda-7.2-7.src.rpm" removed my source and did a fresh rpm install of "anaconda-7.2-7.src.rpm" which produced "anaconda-7.2.tar.bz2" I then bunzip2'd this file to produce "anaconda-7.2.tar" and then extracted the source directory "anaconda-7.2" and change directory to "anaconda-7.2/scripts" checked out line 146 and 147 of splitdistro and they showed: os.system("mkdir -p %s %s %s/SRPMS %s/RedHat/RPMS" % (disc1Dir, disc1SrcDir, disc2SrcDir, disc2Dir)) which cause line 179 to break with the following message: Traceback (innermost last): File "/usr/lib/anaconda-runtime/splitdistro", line 179, in ? srcPkgList = os.listdir("%s/SRPMS" % disc1SrcDir) now if this program is working for you, that's nice, because it can't, if your using the source package distributed by RedHat Currently for 7.2 "anaconda-7.2-7.src.rpm" as well as the binary package "anaconda-runtime-7.2-7.i386.rpm". Thanks, Len Hickey Hello borgan;
I usually run under the /bin/zsh, so I reset my parameters to run under
/bin/bash,
the results are still the same:
[root@sage redhat72]# splitdistro --fileorder /redhat72/pkgorder.txt /redhat72
i386
Splitting tree...
Creating disc1...
Creating disc2...
Creating first source disc...
Creating second source disc...
Traceback (innermost last):
File "/usr/lib/anaconda-runtime/splitdistro", line 179, in ?
srcPkgList = os.listdir("%s/SRPMS" % disc1SrcDir)
OSError: [Errno 2] No such file or directory
[root@sage redhat72]# set
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05" [2]="8" [3]="1" [4]="release"
[5]="i386-redhat-linux-gnu")
BASH_VERSION=$'2.05.8(1)-release'
COLORS=/etc/DIR_COLORS
COLORTERM=gnome-terminal
COLUMNS=80
DIRSTACK=()
DISPLAY=:0.0
EDITOR=/bin/ex
EUID=0
FCEDIT=/bin/ex
GDMSESSION=Gnome
GDM_LANG=en_US
GNOME_SESSION_NAME=Nautilus
GROUPS=()
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=sage.jsv.qwest.net
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
KDEDIR=/usr
LAMHELPFILE=/etc/lam/lam-helpfile
LANG=en_US
LESSOPEN=$'|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS=$'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'
MACHTYPE=i386
MAIL=/var/spool/mail/root
MAILCHECK=60
MANPATH=/usr/local/share/man:/usr/local/man:/usr/share/man:/usr/share/man/man:/usr/share/pvm3/man:/usr/X11R6/man:/usr/kerberos/man:/usr/share/doc/rpm-devel-4.0.3/apidocs/man
OLDPWD=/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/opt/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/lib/anaconda-runtime
PIPESTATUS=([0]="0")
PPID=4676
PROMPT_COMMAND=$'echo -ne "\\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\\007"'
PS1=$'[\\u@\\h \\W]\\$ '
PS2=$'> '
PS4=$'+ '
PVM_ROOT=/usr/share/pvm3
PVM_RSH=/usr/bin/rsh
PWD=/redhat72
PYTHONPATH=/usr/lib/anaconda
QTDIR=/usr/lib/qt-2.3.1
SESSION_MANAGER=local/sage.jsv.qwest.net:/tmp/.ICE-unix/4292
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=3
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SUPPORTED=en_US:en
TERM=xterm
UID=0
USER=root
VISUAL=/bin/vi
WINDOWID=39845908
XAUTHORITY=/root/.Xauthority
XMODIFIERS=@im=none
XPVM_ROOT=/usr/share/pvm3/xpvm
_=i386
i=/etc/profile.d/xpvm.sh
langfile=/root/.i18n
sourced=1
mc ()
{
mkdir -p ~/.mc/tmp 2>/dev/null;
chmod 700 ~/.mc/tmp;
MC=~/.mc/tmp/mc-$$;
/usr/bin/mc -P "$@" >"$MC";
cd "`cat $MC`";
/bin/rm "$MC";
unset MC
}
[root@sage redhat72]#
===============================================================================
I sometimes forget to change my enviroment back to more limited operations,
since I can
move around quite freely in the /usr/bin/nvi editor using the /bin/zsh. I
normally operate
in this environment.
Just by attempting to run under /bin/bash my aliases were changed from:
sage# alias
cp='/bin/cp -i'
ls='/bin/ls --color=auto'
mv='/bin/mv -i'
run-help=man
which-command=whence
sage# export SHELL=/bin/bash;/bin/bash
to this:
[root@sage redhat72]# alias
alias cp='cp -i'
alias l.='ls -d .[a-zA-Z]* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias mv='mv -i'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot
--show-tilde'
[root@sage redhat72]#
======================
This is in response to katzj and to demonstrate the manual calls DON'T WORK! in the /bin/zsh: sage# /bin/rm -rf disc4/ sage# /bin/mkdir disc4 sage# /bin/cp -al SRPMS/. disc4/ /bin/ls -d disc4/SRPMS/ /bin/ls: disc4/SRPMS/: No such file or directory sage# and now for /bin/bash: sage# export SHELL=/bin/bash;/bin/bash [root@sage redhat72]# /bin/rm -rf disc4/ [root@sage redhat72]# /bin/mkdir disc4 [root@sage redhat72]# /bin/cp -al SRPMS/. disc4/ [root@sage redhat72]# /bin/ls -d disc4/SRPMS/ /bin/ls: disc4/SRPMS/: No such file or directory [root@sage redhat72]# So what does the contents of your SRPMS directory look like? Obviously if this is working for me and not for you, something about the SRPMS directory that you're using doesn't match the way we generate trees. Created attachment 915100 [details]
Comment
(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).
Aha, your SRPMS dir isn't laid out the same as ours are on trees when we internally build them. You really need it to look like SRPMS/ README COPYING SRPMS/ (all of *.src.rpm here) Otherwise, you don't get the necessary READMEs and the like on the source CDs. I'll try to make splitdistro a little more forgiving of this when I get a chance Hello borgan; This area could really use some more ample documentation, I am currently using a preliminary document supplied by Tony Nugent <Tony.au> Linux-Works - Gold Coast Qld Australia which has a reoccuring theme of <untested>. ;-) I have altered the document some what, still not really a mini-HOWTO quality yet!;-( Thanks, Len Hickey |
From Bugzilla Helper: User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-31 i686) Description of problem: splitdistro errors out unable to find the /SRPMS directory and fails to split the SRPMS into two separate discs. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.export PYTHONPATH=/usr/lib/anaconda 2.export PATH="$PATH:/usr/lib/anaconda-runtime" 3.splitdistro --fileorder /redhat72/pkgorder.txt /redhat72 i386 Actual Results: Splitting tree... Creating disc1... Creating disc2... Creating first source disc... Creating second source disc... Traceback (innermost last): File "/usr/lib/anaconda-runtime/splitdistro", line 179, in ? srcPkgList = os.listdir("%s/SRPMS" % disc1SrcDir) OSError: [Errno 2] No such file or directory Expected Results: Splitting tree... Creating disc1... Creating disc2... Creating first source disc... Creating second source disc... 649M /redhat72/i386-disc1 687M /redhat72/i386-disc2 650M /redhat72/i386-disc3 547M /redhat72/i386-disc4 Additional info: Here's the PATCH to correct splitdistro ===================================================================== *** /usr/lib/anaconda-runtime/splitdistro.org Fri Apr 26 11:17:04 2002 --- anaconda-7.2/scripts/splitdistro Fri Apr 26 12:31:50 2002 *************** *** 143,149 **** os.system("rm -rf %s %s %s %s" % ( disc1Dir, disc2Dir, disc1SrcDir, disc2SrcDir)) ! os.system("mkdir -p %s %s %s/SRPMS %s/RedHat/RPMS" % (disc1Dir, disc1SrcDir, disc2SrcDir, disc2Dir)) print "Creating disc1..." --- 143,149 ---- os.system("rm -rf %s %s %s %s" % ( disc1Dir, disc2Dir, disc1SrcDir, disc2SrcDir)) ! os.system("mkdir -p %s %s/SRPMS %s/SRPMS %s/RedHat/RPMS" % (disc1Dir, disc1SrcDir, disc2SrcDir, disc2Dir)) print "Creating disc1..." *************** *** 170,176 **** disc2pkgs); print "Creating first source disc..." ! os.system("cp -al %s/. %s" % (srcDir, disc1SrcDir)) stamp(disc1SrcDir, "disc3", arch, startedAt) print "Creating second source disc..." --- 170,176 ---- disc2pkgs); print "Creating first source disc..." ! os.system("cp -al %s/. %s/SRPMS" % (srcDir, disc1SrcDir)) stamp(disc1SrcDir, "disc3", arch, startedAt) print "Creating second source disc..." *************** *** 184,191 **** "%s/SRPMS" % disc2SrcDir, disc2pkgs); - sys.exit(0) - sys.stdout.flush() - os.system("du -sh %s %s %s" % (disc1Dir, disc2Dir, disc1SrcDir)) --- 184,192 ---- "%s/SRPMS" % disc2SrcDir, disc2pkgs); sys.stdout.flush() + + os.system("du -sh %s %s %s %s" % (disc1Dir, disc2Dir, disc1SrcDir, disc2SrcDir)) + + sys.exit(0) =====================================================================