ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] codeine-1.0.1.3-alt8: Sisyphus/i586 test rebuild failed
Date: Mon, 16 Mar 2009 14:32:15 +0300
Message-ID: <20090316113215.GI9773@altlinux.org> (raw)
In-Reply-To: <20090316101515.GH9773@altlinux.org>


[-- Attachment #1.1: Type: text/plain, Size: 7583 bytes --]

On Mon, Mar 16, 2009 at 01:15:15PM +0300, Alexey Tourbin wrote:
> > > Дело в том что пакет ghostscript-utils требует /usr/bin/dvips.
> > > Когда ghostscript-utils идёт первым, то он вытягивает texlive,
> > > и после этого tetex поставить уже нельзя из-за конфликтов.
> > 
> > А какое поведение следует считать в данном случае правильным: 
> > в обоих случаях должен быть выбран tetex-dvips и сформирован чрут?
> 
> Правильно сделать патч на апт, чтобы он формировал список пакетов
> в две стадии: первая стадия -- поверхностный выбор пакетов, вторая --
> глубокий выбор (с дополнением всех зависимостей).
> 
> Сейчас фаза всего одна, она для каждого пакета совмещает как отбор
> самого пакета, так и отбор всех его зависимостей.
> 
> То есть сейчас работает псевдокод
> 
> 	for p in ghostscript-utils tetex-latex 
> 		shallow_mark p
> 		deep_mark p
> 
> На стадии "deep_mark ghostscript-utils" отбирается
> texlive, а на следующией итерации "shallow_mark tetex-latex"
> получается привет.
> 
> А должен работать псевдокод
> 
> 	for p in ghostscript-utils tetex-latex 
> 		shallow_mark p
> 	for p in ghostscript-utils tetex-latex 
> 		deep_mark p
> 
> Тогда во втором цикле texlive выбран не будет, потому что альтернативный
> кандидат tetex-core уже выбран.

Приложил предварительный патч на "apt-get install".
Вроде работает.

$ hsh --no-stuff --init && hsh-install ghostscript-utils tetex-latex
<86>Mar 16 11:24:33 userdel[11006]: delete user `rooter'
<86>Mar 16 11:24:33 userdel[11006]: remove group `rooter'
<86>Mar 16 11:24:33 groupadd[11007]: new group: name=rooter, gid=507
<86>Mar 16 11:24:33 useradd[11008]: new user: name=rooter, uid=507, gid=507, home=/root, shell=/bin/bash
<86>Mar 16 11:24:33 userdel[11010]: delete user `builder'
<86>Mar 16 11:24:33 userdel[11010]: remove group `builder'
<86>Mar 16 11:24:33 groupadd[11011]: new group: name=builder, gid=508
<86>Mar 16 11:24:33 useradd[11012]: new user: name=builder, uid=508, gid=508, home=/usr/src, shell=/bin/bash
Reading Package Lists...
Building Dependency Tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  tetex-latex: PreDepends: tetex-core (= 2.0-alt6)
               Depends: /usr/bin/etex
               Depends: /usr/bin/pdfetex
               Depends: /usr/share/man/man1/etex.1.bz2
               Depends: /usr/share/man/man1/pdftex.1.bz2
E: Broken packages
hsh-install: failed to calculate package file list.
hsh-install: Failed to generate package file list.

$ pwd
/tmp/.private/at/BUILD/apt-0.5.15lorg2
$ export PATH=$PWD/cmdline:$PATH
$ hsh --no-stuff --init && hsh-install ghostscript-utils tetex-latex
<86>Mar 16 11:25:08 userdel[12264]: delete user `rooter'
<86>Mar 16 11:25:08 userdel[12264]: remove group `rooter'
<86>Mar 16 11:25:08 groupadd[12265]: new group: name=rooter, gid=507
<86>Mar 16 11:25:08 useradd[12266]: new user: name=rooter, uid=507, gid=507, home=/root, shell=/bin/bash
<86>Mar 16 11:25:08 userdel[12268]: delete user `builder'
<86>Mar 16 11:25:08 userdel[12268]: remove group `builder'
<86>Mar 16 11:25:08 groupadd[12269]: new group: name=builder, gid=508
<86>Mar 16 11:25:08 useradd[12270]: new user: name=builder, uid=508, gid=508, home=/usr/src, shell=/bin/bash
<13>Mar 16 11:25:15 rpmi: libjpeg-1:6b-alt9 installed
<13>Mar 16 11:25:15 rpmi: libpng12-1.2.35-alt1 installed
<13>Mar 16 11:25:15 rpmi: tex-common-0.1-alt1 installed
<13>Mar 16 11:25:15 rpmi: libtiff-3.8.2-alt3 installed
<13>Mar 16 11:25:15 rpmi: libsqlite3-3.5.9-alt4 installed
<13>Mar 16 11:25:15 rpmi: libnspr-1:4.7.3-alt1 installed
<13>Mar 16 11:25:15 rpmi: libICE-1.0.5-alt1 installed
<13>Mar 16 11:25:16 rpmi: libfreetype-2.3.9-alt1 installed
<13>Mar 16 11:25:16 rpmi: libSM-1.1.0-alt3 installed
<13>Mar 16 11:25:16 rpmi: libnss-3.12.3-alt1.20081117 installed
<13>Mar 16 11:25:16 rpmi: nss-utils-3.12.3-alt1.20081117 installed
<13>Mar 16 11:25:16 rpmi: libjasper-1.900.1-alt1 installed
<13>Mar 16 11:25:16 rpmi: libstdc++4.3-4.3.2-alt7 installed
<86>Mar 16 11:25:16 groupadd[12522]: new group: name=crontab, gid=36
<13>Mar 16 11:25:16 rpmi: crontab-control-1.1-alt1 installed
<13>Mar 16 11:25:16 rpmi: setproctitle-0.3.2-alt1 installed
<13>Mar 16 11:25:16 rpmi: vixie-cron-4.1.20060426-alt5 installed
<13>Mar 16 11:25:16 rpmi: crontabs-1.8-alt1 installed
<13>Mar 16 11:25:16 rpmi: stmpclean-0.3-alt2 installed
<13>Mar 16 11:25:16 rpmi: psutils-1:p17-alt2 installed
<13>Mar 16 11:25:16 rpmi: libjbig-1.6-alt2 installed
<13>Mar 16 11:25:16 rpmi: xorg-rgb-1.0.3-alt1 installed
<13>Mar 16 11:25:16 rpmi: libnetpbm-10.35.32-alt1 installed
<13>Mar 16 11:25:16 rpmi: ncompress-4.2.4.2-alt1 installed
<13>Mar 16 11:25:16 rpmi: mailx-8.1.2-alt5 installed
<13>Mar 16 11:25:16 rpmi: sharutils-4.6.3-alt1.1 installed
<13>Mar 16 11:25:16 rpmi: xml-common-0.6.3-alt11 installed
<13>Mar 16 11:25:16 rpmi: libxml2-1:2.7.3-alt1 installed
<13>Mar 16 11:25:17 rpmi: netpbm-10.35.32-alt1 installed
<13>Mar 16 11:25:17 rpmi: libpixman-1:0.14.0-alt1 installed
<13>Mar 16 11:25:17 rpmi: libtasn1-1.8-alt1 installed
<13>Mar 16 11:25:17 rpmi: libglitz-1:0.5.7-alt3 installed
<13>Mar 16 11:25:17 rpmi: libgcrypt-common-1.4.4-alt1 installed
<13>Mar 16 11:25:17 rpmi: libgpg-error-1.6-alt1 installed
<13>Mar 16 11:25:17 rpmi: libgcrypt-1.4.4-alt1 installed
<13>Mar 16 11:25:17 rpmi: libgnutls26-2.6.4-alt1 installed
<13>Mar 16 11:25:17 rpmi: libcups-1.3.9-alt2 installed
<13>Mar 16 11:25:17 rpmi: libXdmcp-1.0.2-alt2 installed
<13>Mar 16 11:25:17 rpmi: libXau-1.0.4-alt2 installed
<13>Mar 16 11:25:17 rpmi: libxcb-1.2-alt2 installed
<13>Mar 16 11:25:17 rpmi: libxcbutil-0.3.3-alt1 installed
<13>Mar 16 11:25:17 rpmi: libX11-locales-3:1.2-alt1 installed
<13>Mar 16 11:25:17 rpmi: libX11-3:1.2-alt1 installed
<13>Mar 16 11:25:17 rpmi: libXext-1.0.5-alt1 installed
<13>Mar 16 11:25:17 rpmi: libXt-1.0.5-alt2 installed
<13>Mar 16 11:25:17 rpmi: libXmu-1.0.4-alt2 installed
<13>Mar 16 11:25:17 rpmi: libXpm-3.5.7-alt2 installed
<13>Mar 16 11:25:17 rpmi: libXrender-0.9.4-alt2 installed
<13>Mar 16 11:25:17 rpmi: libexpat-2.0.1-alt0.1 installed
<13>Mar 16 11:25:17 rpmi: fontconfig-2.6.0-alt3 installed
Updating fonts cache: <29>Mar 16 11:25:19 fontconfig: Updating fonts cache: succeeded
[ DONE ]
<13>Mar 16 11:25:19 rpmi: libcairo-1:1.8.6-alt3 installed
<13>Mar 16 11:25:20 rpmi: libgs-8.64-alt2 installed
<13>Mar 16 11:25:21 rpmi: fonts-type1-urw-2:1.0.7pre44-alt1 installed
<13>Mar 16 11:25:24 rpmi: ghostscript-common-8.64-alt2 installed
<13>Mar 16 11:25:25 rpmi: ghostscript-classic-8.64-alt2 installed
<13>Mar 16 11:25:25 rpmi: dialog-1.1-alt2 installed
<13>Mar 16 11:25:31 rpmi: tetex-core-2.0-alt6 installed
<13>Mar 16 11:25:32 rpmi: tetex-dvips-2.0-alt6 installed
<13>Mar 16 11:25:32 rpmi: libXaw-1.0.5-alt3 installed
<13>Mar 16 11:25:33 rpmi: libkpathsea-2008.0-alt0.9 installed
<13>Mar 16 11:25:33 rpmi: texlive-common-0.1-alt1 installed
<13>Mar 16 11:25:33 rpmi: texlive-doc-base-2008.0-alt0.9 installed
<13>Mar 16 11:25:33 rpmi: ghostscript-minimal-8.64-alt2 installed
<13>Mar 16 11:25:33 rpmi: ghostscript-utils-8.64-alt2 installed
<13>Mar 16 11:25:33 rpmi: tetex-latex-2.0-alt6 installed
$

Почему-то всё равно вытягивает texlive-common и texlive-doc-base.
Но хотя бо так!

[-- Attachment #1.2: apt-0.5.15lorg2-mark.patch --]
[-- Type: text/plain, Size: 4857 bytes --]

--- apt-0.5.15lorg2/cmdline/apt-get.cc-	2009-03-16 12:59:03 +0300
+++ apt-0.5.15lorg2/cmdline/apt-get.cc	2009-03-16 14:18:14 +0300
@@ -1234,10 +1234,12 @@ bool DownloadPackages(vector<string> &UR
 // ---------------------------------------------------------------------
 /* This used to be inlined in DoInstall, but with the advent of regex package
    name matching it was split out.. */
-bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
-		  pkgProblemResolver &Fix,bool Remove,bool BrokenFix,
+bool TryToInstall(pkgCache::PkgIterator &Pkg,pkgDepCache &Cache,
+		  pkgProblemResolver &Fix,bool Remove, bool& mark,
 		  unsigned int &ExpectedInst,bool AllowFail = true)
 {
+   mark = false;
+
    // CNC:2004-03-03 - Improved virtual package handling.
    if (Pkg->VersionList == 0 && Pkg->ProvidesList != 0)
    {
@@ -1483,6 +1485,7 @@ bool TryToInstall(pkgCache::PkgIterator 
    
    // Install it
    Cache.MarkInstall(Pkg,false);
+   mark = true;
    if (State.Install() == false)
    {
       if (_config->FindB("APT::Get::ReInstall",false) == true)
@@ -1502,10 +1505,7 @@ bool TryToInstall(pkgCache::PkgIterator 
    }   
    else
       ExpectedInst++;
-   
-   // Install it with autoinstalling enabled.
-   if (State.InstBroken() == true && BrokenFix == false)
-      Cache.MarkInstall(Pkg,true);
+
    return true;
 }
 									/*}}}*/
@@ -1988,6 +1988,7 @@ bool DoInstall(CommandLine &CmdL)
    else if (strcasecmp(CmdL.FileList[0],"reinstall") == 0)
       _config->Set("APT::Get::ReInstall", true);
 
+   std::list<pkgCache::PkgIterator> marked;
    for (const char **I = CmdL.FileList + 1; *I != 0; I++)
    {
       // Duplicate the string
@@ -2140,6 +2141,7 @@ bool DoInstall(CommandLine &CmdL)
 
 	    // Run over the matches
 	    bool Hit = false;
+	    bool mark;
 	    for (vector<string>::const_iterator I = VS.begin();
 	         I != VS.end(); I++) {
 
@@ -2150,8 +2152,10 @@ bool DoInstall(CommandLine &CmdL)
 	       ioprintf(c1out,_("Selecting %s for '%s'\n"),
 			Pkg.Name(),OrigS);
 	    
-	       Hit |= TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,
+	       Hit |= TryToInstall(Pkg,Cache,Fix,Remove,mark,
 				   ExpectedInst,true);
+	       if (mark)
+		  marked.push_back(Pkg);
 	    }
 	 
 	    if (Hit == true)
@@ -2176,6 +2180,7 @@ bool DoInstall(CommandLine &CmdL)
 	 
 	 // Run over the matches
 	 bool Hit = false;
+	 bool mark;
 	 for (Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++)
 	 {
 	    if (regexec(&Pattern,Pkg.Name(),0,0,0) != 0)
@@ -2190,8 +2195,10 @@ bool DoInstall(CommandLine &CmdL)
 	       if (TryToChangeVer(Pkg,Cache,Fix,VerOp,VerTag,VerIsRel) == false)
 		  return false;
 	    
-	    Hit |= TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,
+	    Hit |= TryToInstall(Pkg,Cache,Fix,Remove,mark,
 				ExpectedInst,false);
+	    if (mark)
+	       marked.push_back(Pkg);
 	 }
 	 regfree(&Pattern);
 	 
@@ -2204,11 +2211,24 @@ bool DoInstall(CommandLine &CmdL)
 	    // CNC:2003-11-05
 	    if (TryToChangeVer(Pkg,Cache,Fix,VerOp,VerTag,VerIsRel) == false)
 	       return false;
-	 if (TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,ExpectedInst) == false)
+	 bool mark;
+	 if (TryToInstall(Pkg,Cache,Fix,Remove,mark,ExpectedInst) == false)
 	    return false;
+	 if (mark)
+	    marked.push_back(Pkg);
       }      
    }
 
+   // Install it with autoinstalling enabled.
+   for (std::list<pkgCache::PkgIterator>::iterator MI = marked.begin();
+	 MI != marked.end(); ++MI)
+   {
+      pkgCache::PkgIterator Pkg = *MI;
+      pkgDepCache::StateCache &State = Cache[Pkg];
+      if (State.InstBroken() == true && BrokenFix == false)
+	 ((pkgDepCache&) Cache).MarkInstall(Pkg,true);
+   }
+
 // CNC:2003-03-19
 #ifdef WITH_LUA
    _lua->SetDepCache(Cache);
@@ -2967,7 +2987,12 @@ bool DoBuildDep(CommandLine &CmdL)
              */
             if (IV.end() == false && 
                 Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
-               TryToInstall(Pkg,Cache,Fix,true,false,ExpectedInst);
+	    {
+	       bool Hit = false;
+	       bool mark;
+               Hit |= TryToInstall(Pkg,Cache,Fix,true,mark,ExpectedInst);
+	    }
+
          }
 	 else // BuildDep || BuildDepIndep
          {
@@ -3100,7 +3125,8 @@ bool DoBuildDep(CommandLine &CmdL)
             if (_config->FindB("Debug::BuildDeps",false) == true)
                cout << "  Trying to install " << (*D).Package << endl;
 
-            if (TryToInstall(Pkg,Cache,Fix,false,false,ExpectedInst) == true)
+	    bool mark;
+            if (TryToInstall(Pkg,Cache,Fix,false,mark,ExpectedInst) == true)
             {
                // We successfully installed something; skip remaining alternatives
                skipAlternatives = hasAlternatives;

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2009-03-16 11:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16  2:46 ` Led
2009-03-16  7:50   ` Epiphanov Sergei
2009-03-16 10:19     ` Kirill Maslinsky
2009-03-16 11:04       ` Led
2009-03-16 12:57         ` Kirill Maslinsky
2009-03-16  8:49   ` Alexey Tourbin
2009-03-16 10:02     ` [devel] tetex / texlive conflict Grigory Batalov
2009-03-21 10:43       ` Michael Shigorin
2009-03-21 14:05         ` Kirill Maslinsky
2009-03-21 15:39           ` Michael Shigorin
2009-03-22 13:20         ` Grigory Batalov
2009-03-16 10:07     ` [devel] codeine-1.0.1.3-alt8: Sisyphus/i586 test rebuild failed Kirill Maslinsky
2009-03-16 10:09       ` Grigory Batalov
2009-03-16 10:20         ` Kirill Maslinsky
2009-03-16 10:15       ` Alexey Tourbin
2009-03-16 11:32         ` Alexey Tourbin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090316113215.GI9773@altlinux.org \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git