FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux User Repository

 
 
LinkBack Thread Tools
 
Old 01-14-2011, 12:46 AM
Brad Fanella
 
Default Wrote Small AUR Helper

On Thu, Jan 13, 2011 at 8:57 PM, Nathan Owens <ndowens.aur@gmail.com> wrote:
> I wrote a little AUR helper in C++, though currently it only downloads the
> tarball if the package name is valid. I am new to C++ and wanted to know if
> you thought the code was good. I was thinking about putting it in AUR, but
> figured I would asked for opinion first. Here is the url for the code:
> http://pastebin.com/aSW1awD4
>

Looks promising. Hopefully the C++ will give the helper a speed boost. :-)

But, err...
https://bbs.archlinux.org/viewforum.php?id=27
 
Old 01-14-2011, 01:08 AM
Thomas Dziedzic
 
Default Wrote Small AUR Helper

On Thu, Jan 13, 2011 at 9:24 PM, Nathan Owens <ndowens.aur@gmail.com> wrote:
> On 01/13/2011 07:46 PM, Brad Fanella wrote:
>>
>> On Thu, Jan 13, 2011 at 8:57 PM, Nathan Owens<ndowens.aur@gmail.com>
>> *wrote:
>>>
>>> I wrote a little AUR helper in C++, though currently it only downloads
>>> the
>>> tarball if the package name is valid. I am new to C++ and wanted to know
>>> if
>>> you thought the code was good. I was thinking about putting it in AUR,
>>> but
>>> figured I would asked for opinion first. Here is the url for the code:
>>> http://pastebin.com/aSW1awD4
>>>
>> Looks promising. Hopefully the C++ will give the helper a speed boost. :-)
>>
>> But, err...
>> https://bbs.archlinux.org/viewforum.php?id=27
>
> After I get an idea how to do a search function, I would add it to the
> program. Though I am of course very new to C++ since it is my first language
> to try and learn.
>
> Thanks for the kind reply to it.
>

Hey, looks like a great start to c++
One thing to look into though is to see if you can interface with the
aur rpc interface. This would be a nice "next step" towards a proper
aur helper imo.
 
Old 01-14-2011, 01:41 AM
Jonathan Conder
 
Default Wrote Small AUR Helper

On 14 January 2011 15:57, Nathan Owens <ndowens.aur@gmail.com> wrote:

> I wrote a little AUR helper in C++, though currently it only downloads the
> tarball if the package name is valid. I am new to C++ and wanted to know if
> you thought the code was good. I was thinking about putting it in AUR, but
> figured I would asked for opinion first. Here is the url for the code:
> http://pastebin.com/aSW1awD4
>

So far so good, just a few pointers:

- The struct Aur isn't necessary - the file field is never used. You should
remove Aur:: from the getFile definition to make it an ordinary function.
- The return type of getFile should be void, not char. I would suggest
passing the -Wall and -pedantic options to g++ so the compiler would catch
these types of issues.
- The only headers I think you need are <iostream>, <stdlib.h> and <string>
(not <string.h>, which is a C header). I might have missed something though.
- As a next step I would use a library to download the file, rather than
calling wget which isn't very efficient. You might choose libcurl, libfetch,
libsoup, Qt, or maybe something else.
- Although it isn't needed yet, I would suggest adding a break statement
after case 1, to avoid errors when you add more cases.

Hope this helps,
Jonathan
 
Old 01-14-2011, 02:24 AM
Nathan Owens
 
Default Wrote Small AUR Helper

On 01/13/2011 07:46 PM, Brad Fanella wrote:

On Thu, Jan 13, 2011 at 8:57 PM, Nathan Owens<ndowens.aur@gmail.com> wrote:

I wrote a little AUR helper in C++, though currently it only downloads the
tarball if the package name is valid. I am new to C++ and wanted to know if
you thought the code was good. I was thinking about putting it in AUR, but
figured I would asked for opinion first. Here is the url for the code:
http://pastebin.com/aSW1awD4


Looks promising. Hopefully the C++ will give the helper a speed boost. :-)

But, err...
https://bbs.archlinux.org/viewforum.php?id=27
After I get an idea how to do a search function, I would add it to the
program. Though I am of course very new to C++ since it is my first
language to try and learn.


Thanks for the kind reply to it.
 
Old 01-14-2011, 03:01 AM
Nathan Owens
 
Default Wrote Small AUR Helper

On 01/13/2011 08:08 PM, Thomas Dziedzic wrote:

On Thu, Jan 13, 2011 at 9:24 PM, Nathan Owens<ndowens.aur@gmail.com> wrote:

On 01/13/2011 07:46 PM, Brad Fanella wrote:

On Thu, Jan 13, 2011 at 8:57 PM, Nathan Owens<ndowens.aur@gmail.com>
wrote:

I wrote a little AUR helper in C++, though currently it only downloads
the
tarball if the package name is valid. I am new to C++ and wanted to know
if
you thought the code was good. I was thinking about putting it in AUR,
but
figured I would asked for opinion first. Here is the url for the code:
http://pastebin.com/aSW1awD4


Looks promising. Hopefully the C++ will give the helper a speed boost. :-)

But, err...
https://bbs.archlinux.org/viewforum.php?id=27

After I get an idea how to do a search function, I would add it to the
program. Though I am of course very new to C++ since it is my first language
to try and learn.

Thanks for the kind reply to it.


Hey, looks like a great start to c++
One thing to look into though is to see if you can interface with the
aur rpc interface. This would be a nice "next step" towards a proper
aur helper imo.
Yep I am currently trying to figure out what I can use to be able to
do that with. Though that would be I guess my next release.
 
Old 01-14-2011, 03:13 AM
Nathan Owens
 
Default Wrote Small AUR Helper

On 01/13/2011 08:41 PM, Jonathan Conder wrote:

On 14 January 2011 15:57, Nathan Owens<ndowens.aur@gmail.com> wrote:


I wrote a little AUR helper in C++, though currently it only downloads the
tarball if the package name is valid. I am new to C++ and wanted to know if
you thought the code was good. I was thinking about putting it in AUR, but
figured I would asked for opinion first. Here is the url for the code:
http://pastebin.com/aSW1awD4


So far so good, just a few pointers:

- The struct Aur isn't necessary - the file field is never used. You should
remove Aur:: from the getFile definition to make it an ordinary function.
- The return type of getFile should be void, not char. I would suggest
passing the -Wall and -pedantic options to g++ so the compiler would catch
these types of issues.
- The only headers I think you need are<iostream>,<stdlib.h> and<string>
(not<string.h>, which is a C header). I might have missed something though.
- As a next step I would use a library to download the file, rather than
calling wget which isn't very efficient. You might choose libcurl, libfetch,
libsoup, Qt, or maybe something else.
- Although it isn't needed yet, I would suggest adding a break statement
after case 1, to avoid errors when you add more cases.

Hope this helps,
Jonathan
Refresh to code. I updated after I noticed the AUR:: stuff wasnt needed.
So I changed the struct to class
 
Old 01-14-2011, 05:12 AM
Thomas Dziedzic
 
Default Wrote Small AUR Helper

On Fri, Jan 14, 2011 at 12:36 AM, Nathan Owens <ndowens.aur@gmail.com> wrote:
> On 01/13/2011 10:13 PM, Nathan Owens wrote:
>>
>> On 01/13/2011 08:41 PM, Jonathan Conder wrote:
>>>
>>> On 14 January 2011 15:57, Nathan Owens<ndowens.aur@gmail.com> *wrote:
>>>
>>>> I wrote a little AUR helper in C++, though currently it only downloads
>>>> the
>>>> tarball if the package name is valid. I am new to C++ and wanted to know
>>>> if
>>>> you thought the code was good. I was thinking about putting it in AUR,
>>>> but
>>>> figured I would asked for opinion first. Here is the url for the code:
>>>> http://pastebin.com/aSW1awD4
>>>>
>>> So far so good, just a few pointers:
>>>
>>> - The struct Aur isn't necessary - the file field is never used. You
>>> should
>>> remove Aur:: from the getFile definition to make it an ordinary function.
>>> - The return type of getFile should be void, not char. I would suggest
>>> passing the -Wall and -pedantic options to g++ so the compiler would
>>> catch
>>> these types of issues.
>>> - The only headers I think you need are<iostream>,<stdlib.h> *and<string>
>>> (not<string.h>, which is a C header). I might have missed something
>>> though.
>>> - As a next step I would use a library to download the file, rather than
>>> calling wget which isn't very efficient. You might choose libcurl,
>>> libfetch,
>>> libsoup, Qt, or maybe something else.
>>> - Although it isn't needed yet, I would suggest adding a break statement
>>> after case 1, to avoid errors when you add more cases.
>>>
>>> Hope this helps,
>>> Jonathan
>>
>> Refresh to code. I updated after I noticed the AUR:: stuff wasnt needed.
>> So I changed the struct to class
>
> Also just remembered, there was a discussion about having a AUR helper in
> community, but since others actually installed it for the user they wouldn't
> be added to community. What I thought about, maybe after it gets improved
> and enough votes, I wonder if it might be able to be added to community.
>

Sorry but aur helpers aren't allowed in [community], and that really
is a hard rule.
 
Old 01-14-2011, 05:36 AM
Nathan Owens
 
Default Wrote Small AUR Helper

On 01/13/2011 10:13 PM, Nathan Owens wrote:

On 01/13/2011 08:41 PM, Jonathan Conder wrote:

On 14 January 2011 15:57, Nathan Owens<ndowens.aur@gmail.com> wrote:

I wrote a little AUR helper in C++, though currently it only
downloads the
tarball if the package name is valid. I am new to C++ and wanted to
know if
you thought the code was good. I was thinking about putting it in
AUR, but

figured I would asked for opinion first. Here is the url for the code:
http://pastebin.com/aSW1awD4


So far so good, just a few pointers:

- The struct Aur isn't necessary - the file field is never used. You
should
remove Aur:: from the getFile definition to make it an ordinary
function.

- The return type of getFile should be void, not char. I would suggest
passing the -Wall and -pedantic options to g++ so the compiler would
catch

these types of issues.
- The only headers I think you need are<iostream>,<stdlib.h>
and<string>
(not<string.h>, which is a C header). I might have missed something
though.

- As a next step I would use a library to download the file, rather than
calling wget which isn't very efficient. You might choose libcurl,
libfetch,

libsoup, Qt, or maybe something else.
- Although it isn't needed yet, I would suggest adding a break statement
after case 1, to avoid errors when you add more cases.

Hope this helps,
Jonathan
Refresh to code. I updated after I noticed the AUR:: stuff wasnt
needed. So I changed the struct to class
Also just remembered, there was a discussion about having a AUR helper
in community, but since others actually installed it for the user they
wouldn't be added to community. What I thought about, maybe after it
gets improved and enough votes, I wonder if it might be able to be added
to community.
 
Old 01-14-2011, 06:44 AM
Nathan Owens
 
Default Wrote Small AUR Helper

On 01/14/2011 12:12 AM, Thomas Dziedzic wrote:

On Fri, Jan 14, 2011 at 12:36 AM, Nathan Owens<ndowens.aur@gmail.com> wrote:

On 01/13/2011 10:13 PM, Nathan Owens wrote:

On 01/13/2011 08:41 PM, Jonathan Conder wrote:

On 14 January 2011 15:57, Nathan Owens<ndowens.aur@gmail.com> wrote:


I wrote a little AUR helper in C++, though currently it only downloads
the
tarball if the package name is valid. I am new to C++ and wanted to know
if
you thought the code was good. I was thinking about putting it in AUR,
but
figured I would asked for opinion first. Here is the url for the code:
http://pastebin.com/aSW1awD4


So far so good, just a few pointers:

- The struct Aur isn't necessary - the file field is never used. You
should
remove Aur:: from the getFile definition to make it an ordinary function.
- The return type of getFile should be void, not char. I would suggest
passing the -Wall and -pedantic options to g++ so the compiler would
catch
these types of issues.
- The only headers I think you need are<iostream>,<stdlib.h> and<string>
(not<string.h>, which is a C header). I might have missed something
though.
- As a next step I would use a library to download the file, rather than
calling wget which isn't very efficient. You might choose libcurl,
libfetch,
libsoup, Qt, or maybe something else.
- Although it isn't needed yet, I would suggest adding a break statement
after case 1, to avoid errors when you add more cases.

Hope this helps,
Jonathan

Refresh to code. I updated after I noticed the AUR:: stuff wasnt needed.
So I changed the struct to class

Also just remembered, there was a discussion about having a AUR helper in
community, but since others actually installed it for the user they wouldn't
be added to community. What I thought about, maybe after it gets improved
and enough votes, I wonder if it might be able to be added to community.


Sorry but aur helpers aren't allowed in [community], and that really
is a hard rule.
That is fine, just thought I remember something about the reason why was
because most of the others install the packages.
 

Thread Tools




All times are GMT. The time now is 09:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org