aboutsummaryrefslogtreecommitdiffstats
path: root/libopkg/pkg_parse.c
AgeCommit message (Collapse)Author
2014-06-05Cleanup trailing whitespaceEmmanuel Deloget
The whitespaces has been removed automatically using the following command line: grep --exclude-dir .git -rHn '[[:space:]]$' | \ awk -F: '{ print $1 }' | sort | uniq | \ grep -v COPYING | \ while read f; do sed -i 's/[[:space:]]*$//g' $f; done The COPYING file has been spared because (a) it's a GNU file, not an opkg file and (b) the ^L control chars are in the [[:space:]] character list (and we don't want them to disapear). Changes to ChangeLog.ipkg were dropped as they are unnecessary for such a legacy file. Signed-off-by: Emmanuel Deloget <logout@free.fr> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-30Add vim modelines to all .c and .h filesPaul Barker
This also corrects the existing vim modelines to match the desired format. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-02-05xfuncs.c: Move to libopkg and remove empty libbbPaul Barker
This involves a lot of header and build system tidyup to remove libbb. We still need to do another pass of header tidyup. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-02-05libopkg: Fixup header inclusionPaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2013-09-02Renamed conf to opkg_configpaul.betafive@gmail.com
This prevents the libopkg from polluting the global namespace. From: Christian Ege <k4230r6@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@689 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-04-26Introduce a specific pointer typedef for parse_line functionsjaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@620 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-04-26Move pkg_parse_from_stream_nomalloc into parse_utiljaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@619 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-04-07Create parse_util with some of the non-public functions from pkg_parse.cjaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@611 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-02-14Add missing space.graham.gower@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@600 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2010-09-15mask && PFM_FOO should instead be mask & PFM_FOO.graham.gower
From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>. git-svn-id: http://opkg.googlecode.com/svn/trunk@564 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2010-08-24Remove stray semicolon.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@557 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2010-08-18Remove trailing whitespace. Sorry if this breaks your patches.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-21Set the arch_priority when parsing the Architecture.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@507 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-21Include config.h to pull in HAVE_* macros where needed.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@505 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-21Initial stab at untangling the #include maze. Probably needs a second pass.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@504 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-11I've made substantial changes to these files. Add new copyright line.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@487 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-09Merge commit 'grg' into HEADgraham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-12-03Fix truncation problem when reading in long lines. Found by Koen Kooi.graham.gower
After realloc()ing a second time for long lines, buflen was one byte short. It did not take into account buf being pointed at the NULL terminator, before the end of the buffer. So when fgets() was next called, it inserted its NULL terminator one byte earlier than expected. The earlier terminator was not overwritten by subsequent iterations as it should have been. git-svn-id: http://opkg.googlecode.com/svn/trunk@438 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-19I'm sure that should have been buf0len.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@334 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-18Fix segfault while attempting to parse invalid package stream.graham.gower
Reported by John L. Chmielewski. git-svn-id: http://opkg.googlecode.com/svn/trunk@331 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-12Fix copy/pasto in error message.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@292 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-12Cleanup the rest of pkg_parse.c. Give some functions more appropriate names too.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@289 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-12Fix parsing of Conffiles lines in status files.graham.gower
Also, add a leading space when writing out the status file such that the parser can recognise these lines as conf file lines. git-svn-id: http://opkg.googlecode.com/svn/trunk@287 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-12Cleanup version string handling.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@286 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-11Remove a debugging fprintf I accidentally left in.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@284 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-11Cleanup parsing of packages.graham.gower
This diff is loosely based on a patch by Jo-Philipp Wich <google@wwsnet.net> posted in the bugtracker (Issue #24). Peak memory consumption while parsing package lists is dramatically reduced. Thanks to Camille Moncelier for fixing problems after reallocing for long lines. git-svn-id: http://opkg.googlecode.com/svn/trunk@283 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-10Remove opkg_internal_use_only and fix associated assumptions RE pkg->provides.graham.gower
It appears that the opkg_internal_use_only provides string was introduced to bandaid over problems with assuming that the pkg->provides, pkg->provides_str and pkg->provides_count are all the same length. As each pkg provides itself, the pkg->provides array was one longer than the str and count fields. Most of the uses of pkg->provides did not take this into account. This behaviour has been changed. pkg->provides is now pkg->provides_count long and it is pkg->provides_str which is shorter by one. Associated dead code has also been removed. git-svn-id: http://opkg.googlecode.com/svn/trunk@277 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-05s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/graham.gower
And redundant error checking removed from the places where allocation failures were actually checked. git-svn-id: http://opkg.googlecode.com/svn/trunk@259 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-11-04s/strdup/xstrdup/ - check memory allocations for failure.graham.gower
git-svn-id: http://opkg.googlecode.com/svn/trunk@255 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2009-10-27Add sha256 ckecksums to okpgticktock35
Thanks to Camille Moncelier <moncelier@devlife.org> http://groups.google.com/group/opkg-devel/browse_thread/thread/78a2eb328da0ef73?utoken=pV1Kli0AAADKDldt5ZXsDDLs9sWCpWZI0mClVcTs45ANzZ7C9NH-1YGBxa5Bow63PTuzFmQCb1c Here is a patch which adds sha256 checksum checking to Opkg. More Opkg patches will follow shortly (x509 and smime signature support, libcurl client/server authentication) I hope these patch will be useful and finds their ways into okpg Camille Moncelier http://devlife.org/ git-svn-id: http://opkg.googlecode.com/svn/trunk@220 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: adding the hash_table_remove API, not using yet.ticktock35
Just complete the API for future usage. Clean all the entry at initial time. This reduces planty of unnecessary check. In order to prevent this kind of bug, using calloc to replace most malloc git-svn-id: http://opkg.googlecode.com/svn/trunk@160 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: make .opk as the default opkg file extensionticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@141 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: remove redundant multiple_providers option and also remove redundant ↵ticktock35
familiar_revision pointer from the pkg struct git-svn-id: http://opkg.googlecode.com/svn/trunk@118 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: (leak fixing, day 2) lots and lots of memory leaks fixedticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@115 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: 's/itsy/opkg/'ticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@67 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: remove opkg.h in preperation for new APIticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@65 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: add support for Tags attributeticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@42 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: Enable Debian style revision field by default and remove "familiar" ↵ticktock35
specific code. Patch from Richard Purdie <rpurdie rpsys net> git-svn-id: http://opkg.googlecode.com/svn/trunk@41 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2008-12-15opkg: re-arrange source code into sub-directoriesticktock35
git-svn-id: http://opkg.googlecode.com/svn/trunk@33 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358