This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[setup] ini in same dir as package - 'base' is one off. (+ patch)


Hallo all,

while preparing for an "ITP" I put a (hand made) setup.ini and my
packages in one (the same) directory on my local webserver. When
downloading/installing from there, I noticed that during the install-
phase, the package showed as 'lang-1.4.9-1', not 'slang-1.4.9-1'.
After some investigation I fouud a one-off in 'package_source.cc'
in the function packagesource::set_canonical.

A patch against the current cvs version (2.8) for this follows.

HTH,

Buzz.

BTW: On the website, would not it be wise to move the links for
preblem-reporting and the mailing-lists _after_ the links for
documentation, FAQ, contributing and news?

BTW2: The instructions for building say to execute bootstrap.sh in the
libgetopt++ directory. That has to be in the root now, since configure
etc. are no longer in cvs. Also setting CFLAGS/CXXFLAGS is needed on
the configure command to prevent '-g' being passed to gcc/g++.

<Patch>
Index: package_source.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/package_source.cc,v
retrieving revision 2.8
diff -u -p -r2.8 package_source.cc
--- package_source.cc	18 Feb 2002 12:35:22 -0000	2.8
+++ package_source.cc	5 Mar 2004 18:33:35 -0000
@@ -44,7 +44,9 @@ packagesource::set_canonical (char const
   while (bstart && (tmp = strchr (bstart + 1, '/')))
     bstart = tmp;
 
-  if (!bstart)
+  if (bstart)
+    bstart++;
+  else
     bstart = fn;
   char const *bend = strchr (bstart, '-');
   while (bend && (tmp = strchr (bend + 1, '-')))
@@ -59,15 +61,15 @@ packagesource::set_canonical (char const
   char const *end = strchr (fn, '\0');
   if (base)
     delete[] base;
-  base = new char[bend - bstart];
-  memcpy (base, bstart + 1, bend - bstart - 1);
-  base[bend - bstart - 1] = '\0';
+  base = new char[bend - bstart + 1];
+  memcpy (base, bstart, bend - bstart);
+  base[bend - bstart] = '\0';
 
   if (filename)
     delete[] filename;
-  filename = new char[end - bstart];
-  memcpy (filename, bstart + 1, end - bstart - 1);
-  filename[end - bstart - 1] = '\0';
+  filename = new char[end - bstart + 1];
+  memcpy (filename, bstart, end - bstart);
+  filename[end - bstart] = '\0';
 
   cached = String();
 }
</Patch>
-- 
  ) |  | ---/ ---/  Yes, this | This message consist of true  | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]