Merge branch 'maint'
Conflicts: contrib/gensync contrib/updatesync
This commit is contained in:
commit
eca30ed66a
12 changed files with 84 additions and 14 deletions
16
ChangeLog.proto
Normal file
16
ChangeLog.proto
Normal file
|
@ -0,0 +1,16 @@
|
|||
2007-12-01 Your Name <youremail@domain.com>
|
||||
|
||||
* pkgver-pkgrel :
|
||||
new upstream release.
|
||||
Reason we changed stuff.
|
||||
Another reason we changed stuff.
|
||||
|
||||
* gcc-4.1.patch :
|
||||
Removed, no longer needed.
|
||||
|
||||
2007-11-01 Your Name <youremail@domain.com>
|
||||
|
||||
* 1.0-5 :
|
||||
added ChangeLog.
|
||||
the last line should end with just one newline.
|
||||
you can cat the file to check it displays fine.
|
|
@ -9,7 +9,7 @@ EXTRA_DIST = HACKING
|
|||
|
||||
# Sample makepkg prototype files
|
||||
pkgdatadir = ${datadir}/${PACKAGE}
|
||||
dist_pkgdata_DATA = PKGBUILD.proto proto.install
|
||||
dist_pkgdata_DATA = PKGBUILD.proto proto.install ChangeLog.proto
|
||||
|
||||
# run the pactest test suite
|
||||
check-local: src/pacman
|
||||
|
|
|
@ -28,6 +28,11 @@ build the package, install the package into a temporary root, make
|
|||
customizations, generate meta-info, and package the whole thing up for pacman
|
||||
to use.
|
||||
|
||||
NOTE: makepkg uses your current locale by default and does not unset it when
|
||||
building packages. If you wish to share your build output with others when
|
||||
seeking help or for other purposes, you may wish to run "`LC_ALL=C makepkg`" so
|
||||
your logs and output are not localized.
|
||||
|
||||
Options
|
||||
-------
|
||||
*\--asroot*::
|
||||
|
@ -83,7 +88,7 @@ Options
|
|||
if required and generate integrity checks. The integrity checks
|
||||
generated are determined by the value of the INTEGRITY_CHECK array in
|
||||
linkman:makepkg.conf[5]. This output can be redirected into your
|
||||
PKGBUILD for source validation (`makepkg -g >> PKGBUILD`).
|
||||
PKGBUILD for source validation using "`makepkg -g >> PKGBUILD`".
|
||||
|
||||
*-h, \--help*::
|
||||
Output syntax and command line options.
|
||||
|
@ -97,6 +102,13 @@ Options
|
|||
Install or upgrade the package after a successful build using
|
||||
linkman:pacman[8].
|
||||
|
||||
*-L, \--log*::
|
||||
Enable makepkg build logging. This will use the *tee* program to send
|
||||
output of the `build()` function to both the console and to a text file in
|
||||
the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned
|
||||
above, the build log will be localized so you may want to set your locale
|
||||
accordingly if sharing the log output with others.
|
||||
|
||||
*-m, \--nocolor*::
|
||||
Disable color in output messages.
|
||||
|
||||
|
|
|
@ -810,6 +810,9 @@ create_package() {
|
|||
if [ "$CARCH" != "" ]; then
|
||||
echo "arch = $CARCH" >>.PKGINFO
|
||||
fi
|
||||
if [ "$(check_option force)" = "y" ]; then
|
||||
echo "force = true" >> .PKGINFO
|
||||
fi
|
||||
|
||||
local it
|
||||
for it in "${license[@]}"; do
|
||||
|
|
|
@ -136,7 +136,7 @@ db_write_entry()
|
|||
# blank out all variables and set pkgfile
|
||||
local pkgfile=$(readlink -f "$1")
|
||||
local pkgname pkgver pkgdesc url builddate packager csize size \
|
||||
group depend backup license replaces provides conflict \
|
||||
group depend backup license replaces provides conflict force \
|
||||
_groups _depends _backups _licenses _replaces _provides _conflicts \
|
||||
startdir
|
||||
|
||||
|
@ -209,7 +209,7 @@ db_write_entry()
|
|||
[ -n "$builddate" ] && echo -e "%BUILDDATE%\n$builddate\n" >>desc
|
||||
[ -n "$packager" ] && echo -e "%PACKAGER%\n$packager\n" >>desc
|
||||
write_list_entry "REPLACES" "$_replaces" "desc"
|
||||
[ $FORCE -eq 1 ] && echo -e "%FORCE%\n" >>desc
|
||||
[ $FORCE -eq 1 -o -n "$force" ] && echo -e "%FORCE%\n" >>desc
|
||||
|
||||
# create depends entry
|
||||
msg2 "$(gettext "Creating 'depends' db entry...")"
|
||||
|
|
|
@ -25,7 +25,6 @@ export TEXTDOMAINDIR='@localedir@'
|
|||
myver='@PACKAGE_VERSION@'
|
||||
confdir='@sysconfdir@'
|
||||
|
||||
FORCE=0
|
||||
REPO_DB_FILE=""
|
||||
|
||||
msg() {
|
||||
|
@ -169,6 +168,9 @@ if [ $success -eq 1 ]; then
|
|||
esac
|
||||
|
||||
bsdtar -c${TAR_OPT}f "$REPO_DB_FILE" *
|
||||
else
|
||||
error "$(gettext "All packages have been removed from the database. Deleting '%s'.")" "$REPO_DB_FILE"
|
||||
rm "$REPO_DB_FILE"
|
||||
fi
|
||||
|
||||
popd 2>&1 >/dev/null
|
||||
|
|
|
@ -115,8 +115,9 @@ int pacman_add(alpm_list_t *targets)
|
|||
for(i = targets; i; i = alpm_list_next(i)) {
|
||||
char *targ = alpm_list_getdata(i);
|
||||
if(alpm_trans_addtarget(targ) == -1) {
|
||||
fprintf(stderr, _("error: failed to add target '%s' (%s)"), targ,
|
||||
alpm_strerrorlast());
|
||||
printf("failed.\n");
|
||||
fprintf(stderr, _("error: '%s': %s\n"),
|
||||
targ, alpm_strerrorlast());
|
||||
add_cleanup();
|
||||
return(1);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ static int query_fileowner(alpm_list_t *targets)
|
|||
int found = 0;
|
||||
char *filename = alpm_list_getdata(t);
|
||||
char *bname;
|
||||
char *dname;
|
||||
char *rpath;
|
||||
struct stat buf;
|
||||
alpm_list_t *i, *j;
|
||||
|
@ -88,10 +89,14 @@ static int query_fileowner(alpm_list_t *targets)
|
|||
}
|
||||
|
||||
bname = mbasename(filename);
|
||||
dname = mdirname(filename);
|
||||
rpath = resolve_path(dname);
|
||||
free(dname);
|
||||
|
||||
if(!(rpath = resolve_path(filename))) {
|
||||
if(!rpath) {
|
||||
fprintf(stderr, _("error: cannot determine real path for '%s': %s\n"),
|
||||
filename, strerror(errno));
|
||||
free(rpath);
|
||||
ret++;
|
||||
continue;
|
||||
}
|
||||
|
@ -100,7 +105,7 @@ static int query_fileowner(alpm_list_t *targets)
|
|||
pmpkg_t *info = alpm_list_getdata(i);
|
||||
|
||||
for(j = alpm_pkg_get_files(info); j && !found; j = alpm_list_next(j)) {
|
||||
char path[PATH_MAX], *ppath;
|
||||
char path[PATH_MAX], *ppath, *pdname;
|
||||
snprintf(path, PATH_MAX, "%s%s",
|
||||
alpm_option_get_root(), (const char *)alpm_list_getdata(j));
|
||||
|
||||
|
@ -109,10 +114,12 @@ static int query_fileowner(alpm_list_t *targets)
|
|||
continue;
|
||||
}
|
||||
|
||||
ppath = resolve_path(path);
|
||||
pdname = mdirname(path);
|
||||
ppath = resolve_path(pdname);
|
||||
free(pdname);
|
||||
|
||||
if(ppath && strcmp(ppath, rpath) == 0) {
|
||||
printf(_("%s is owned by %s %s\n"), rpath,
|
||||
printf(_("%s is owned by %s %s\n"), filename,
|
||||
alpm_pkg_get_name(info), alpm_pkg_get_version(info));
|
||||
found = 1;
|
||||
}
|
||||
|
|
|
@ -108,8 +108,8 @@ int pacman_remove(alpm_list_t *targets)
|
|||
char *targ = alpm_list_getdata(i);
|
||||
if(alpm_trans_addtarget(targ) == -1) {
|
||||
printf("failed.\n");
|
||||
fprintf(stderr, _("error: failed to add target '%s' (%s)\n"), targ,
|
||||
alpm_strerrorlast());
|
||||
fprintf(stderr, _("error: '%s': %s\n"),
|
||||
targ, alpm_strerrorlast());
|
||||
remove_cleanup();
|
||||
FREELIST(finaltargs);
|
||||
return(1);
|
||||
|
|
|
@ -568,7 +568,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
|
|||
}
|
||||
if(pm_errno != PM_ERR_PKG_NOT_FOUND) {
|
||||
fprintf(stderr, _("error: '%s': %s\n"),
|
||||
(char *)i->data, alpm_strerrorlast());
|
||||
targ, alpm_strerrorlast());
|
||||
retval = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
@ -187,6 +187,34 @@ char *mbasename(const char *path)
|
|||
return (char *)p;
|
||||
}
|
||||
|
||||
/** Parse the dirname of a program from a path.
|
||||
* The path returned should be freed.
|
||||
* @param path path to parse dirname from
|
||||
*
|
||||
* @return everything preceding the final '/'
|
||||
*/
|
||||
char *mdirname(const char *path)
|
||||
{
|
||||
char *ret, *last;
|
||||
|
||||
/* null or empty path */
|
||||
if(path == NULL || path == '\0') {
|
||||
return(strdup("."));
|
||||
}
|
||||
|
||||
ret = strdup(path);
|
||||
last = strrchr(ret, '/');
|
||||
|
||||
if(last != NULL) {
|
||||
/* we found a '/', so terminate our string */
|
||||
*last = '\0';
|
||||
return(ret);
|
||||
}
|
||||
/* no slash found */
|
||||
free(ret);
|
||||
return(strdup("."));
|
||||
}
|
||||
|
||||
/* output a string, but wrap words properly with a specified indentation
|
||||
*/
|
||||
void indentprint(const char *str, int indent)
|
||||
|
|
|
@ -41,6 +41,7 @@ int getcols();
|
|||
int makepath(const char *path);
|
||||
int rmrf(const char *path);
|
||||
char *mbasename(const char *path);
|
||||
char *mdirname(const char *path);
|
||||
void indentprint(const char *str, int indent);
|
||||
char *strtoupper(char *str);
|
||||
char *strtrim(char *str);
|
||||
|
|
Loading…
Add table
Reference in a new issue